﻿namespace RedBit.OAuthLibrary
{
    public class TwitterOAuth
    {
        //url to get the request token
        public string RequestTokenUrl { get { return string.Format("https://api.twitter.com/oauth/request_token?oauth_callback={0}", CallbackUrl); } }

        //url to get the access token
        public string AccessTokenUrl { get { return string.Format("https://api.twitter.com/oauth/access_token?oauth_verifier={0}", Verifier); } }

        //url for user to authenticate with twitter
        public string AuthenticationUrl { get { return string.Format("http://api.twitter.com/oauth/authorize?oauth_token={0}", Token); } }
        public string CallbackUrl { get { return "http://localhost/WP7HtmlPages/TwitterMobileClientCallback.htm"; } }

        //url to update twitter status
        public string StatusUpdateUrl { get { return "http://api.twitter.com/1/statuses/update.xml?status={0}"; } }

        //url to verify the credentials of the user
        public string VerifyCredentialsUrl { get { return "http://api.twitter.com/1/account/verify_credentials.xml"; } }

        //key and secret when app is registered
        public string ConsumerKey { get; set; }
        public string ConsumerSecret { get; set; }

        //received after the token has been requested
        public string Token { get; set; }
        public string TokenSecret { get; set; }

        // Received after the user has logged in
        public string Verifier { get; set; }

        //these valuse are set once the OAuth process is complete
        public string UserId { get; set; }
        public string ScreenName { get; set; }
    }
}
